<%@page import="java.io.PrintWriter"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@page import="java.util.ArrayList" %>
<%@page import="com.sun.xml.internal.txw2.Document"%>

<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">


<title>DAILY DEPOSIT & REFUND</title>
</head>

<body>	

	<table border="1" align="center" style="font-family: sans-serif; font-size: small; ">	
		<tr >
			<td colspan="7" rowspan="2" valign="middle" align="center" style="font-weight: bold;" >
				DAILY DEPOSIT & REFUND				
			</td>
		</tr>
		<tr/>
		<tr>
			<td colspan="5" align="left">
				DATE: ${date}				
			</td>
			<td colspan="2" align="center"  >
				Rooms Deposit Received 
			</td>	
		</tr>
		<tr>
			<td colspan="1" align="center">				
			</td>
			<td colspan="2" align="center">				
			</td>
			<td colspan="2" align="center">
			</td>
			<td colspan="1" align="center">
				Register S No: 
			</td>
			<td colspan="1" align="center">
				Total Amount(X) 
			</td>	
		</tr>
		<tr>
			<td colspan="1" align="center">				
			</td>
			<td colspan="2" align="center">				
			</td>
			<td colspan="2" align="center">
			</td>
			<td colspan="1" align="center"  >
				${depositTransactionIdRange} 
			</td>
			<td colspan="1" align="center"  >
				${totalDeposit} 
			</td>	
		</tr>		
		<tr>
			<td colspan="1" align="center" >				
			</td>
			<td colspan="2" align="center" >
				Utensils Deposits Received
			</td>
			<td colspan="2" align="center" >
				Utensils Deposits Refund
			</td>
			<td colspan="2" align="center" >
				Rooms Deposit Refund 
			</td>					
		</tr>
		<tr>
			<td  >S. No.</td>
			<td   align="center">Transaction Id</td><td align="center" >Amount</td>
			<td align="center" >Transaction Id</td><td align="center" >Amount</td>
			<td align="center" >Transaction Id</td><td align="center" >Amount</td>
		</tr>
		
		<c:forEach var="recs" items="${allRecords}" varStatus="status">			
		    <tr>
				<td >${status.count}</td>
				<td align="center" >${paientIdUtensilAllocated[status.count-1]}</td>
				<td align="right" >${amountIdUtensilAllocated[status.count-1]}</td>
				<td align="center">${paientIdUtensilDeAllocated[status.count-1]}</td>
				<td align="right" >${amountIdUtensilDeAllocated[status.count-1]}</td>
				<td align="center">${transactionIdCheckOut[status.count-1]}</td>
				<td align="right" >${amountCheckOut[status.count-1]}</td>
			</tr>	
		</c:forEach>
		<tr>
			<td colspan="1" >
			</td>
			<td >Total(UD)</td><td  align="right">${totalUtensilDeposit} </td>
			<td >Total(UR)</td><td  align="right">${totalUtensilDepositReturned}</td>
			<td >Total(Y)</td><td   align="right">${totalDepositReturned} </td>
		</tr>
		
		<tr>
			<td align="center" colspan="7" >
				DEPOSIT LEDGER 
			</td>
		</tr>
		<tr>
			<td align="center" colspan="1">
				OPENING BAL.
			</td>
			<td align="center" colspan="2">
				Room D (X)
			</td>
			<td align="center" colspan="2">
				Room R (Y)
			</td>
			<td align="center" colspan="2">
				CLOSING BAL.
			</td>
		</tr>
		<tr>
			<td align="center" colspan="1" >	${openingBalanceRoom}</td>
			<td align="center" colspan="2" >	${totalDeposit}</td>
			<td align="center" colspan="2" >${totalDepositReturned}</td>
			<td align="center" colspan="2" >${closingBalanceRoom}</td>
		</tr>
		<tr>
			<td align="center" colspan="1" >
				OPENING BAL.
			</td>
			<td align="center" colspan="2" >
				Utensil D (UD)
			</td>
			<td align="center" colspan="2" >
				Utensil R (UR)
			</td>
			<td align="center" colspan="2" >
				CLOSING BAL.
			</td>
		</tr>
		<tr>
			<td align="center" colspan="1" >
				${openingBalanceUtensil}
			</td>
			<td align="center" colspan="2" >
				${totalUtensilDeposit}
			</td>
			<td align="center" colspan="2" >
				${totalUtensilDepositReturned}
			</td>
			<td align="center" colspan="2" >
				${closingBalanceUtensil}
			</td>
		</tr>
		
		<tr>
			<td align="center" colspan="7"  >
				CASH BALANCES
			</td>
		</tr>
				
		<tr>
			<td>Room D (X)</td><td>Room R (Y)</td><td>(X-Y)(G)</td><td>Utensil D(UD)</td><td>Utensil R(UR)</td><td colspan="2">(UD-UR) (H)</td>
		</tr>
		<tr>
			<td  >${totalDeposit}</td><td  >${totalDepositReturned}</td><td  >${deposit3}</td><td >${totalUtensilDeposit}</td><td >${totalUtensilDepositReturned}</td><td colspan="2" >${deposit6}</td>
		</tr>
		<tr>
			<td colspan="2" style="font-weight: bold;">FINAL CASH BALANCE (G+H)</td>
			<td colspan="5" style="font-weight: bold;"  >${finalCashBalance} </td>		
		</tr>
		
		<tr >
			<td colspan="7" valign="bottom" align="right">
				<br/>
				Signature
			</td>
		</tr>

				
	</table>

</body>

</html>